package com.yt.app.api.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.yt.website.api.model.UserInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel(value = "用户信息", description = "")
public class UserVo {
    @ApiModelProperty(value = "id", required = true)
    private Long id;
    @ApiModelProperty(value = "昵称", required = true)
    private String nick;
    @ApiModelProperty(value = "真实姓名", required = true)
    private String realName;
    @ApiModelProperty(value = "密码", hidden = true)
    @JSONField(serialize = false)
    private String password;
    @ApiModelProperty(value = "性别", required = true)
    private String sex;
    @ApiModelProperty(value = "身份证号", required = true)
    private String identify;
    @ApiModelProperty(value = "手机", required = true)
    private String mobile;
    @ApiModelProperty(value = "用户类型：0：普通用户，1：企业HR", required = true)
    private Short userType;
    @ApiModelProperty(value = "头像")
    private String userIcon;

    public UserVo(UserInfo userInfo){
        this.id = userInfo.getId();
        this.nick = userInfo.getNick();
        this.realName = userInfo.getRealName();
        //this.password = userInfo.getPassword();
        this.identify = userInfo.getIdentify();
        this.mobile = userInfo.getMobile();
        this.userType = userInfo.getUserType();
        this.userIcon = userInfo.getUserIcon();
        this.sex = userInfo.getSex();
    }
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getNick() {
        return nick;
    }

    public void setNick(String nick) {
        this.nick = nick;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex= sex;
    }

    public String getIdentify() {
        return identify;
    }

    public void setIdentify(String identify) {
        this.identify = identify;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public Short getUserType() {
        return userType;
    }

    public void setUserType(Short userType) {
        this.userType = userType;
    }

    public String getUserIcon() {
        return userIcon;
    }

    public void setUserIcon(String userIcon) {
        this.userIcon = userIcon;
    }
}
